import { memo } from "react";
import {
  RecommendWrapped,
  Content,
  RecommendLeft,
  RecommendRight
} from "./style";
import HTopBanner from "./child-cpns/top-banner";
import HHotRecommend from "./child-cpns/hot-recommend";
import HRanking from "./child-cpns/ranking";
import HNewAlbum from "./child-cpns/new-album";
/*
非redux-hook关联方式
function HRecommend (props) {
    useEffect(
      () => {
        props.getBanners();
      }
    ,[])
  return (
    <div>HRecommend</div>
  )
}

const mapStateToProps = (state) => {
  return {
      topBanners : state.recommend.topBanners
  }
}

const mapDispatchToProps = (dispatch) =>{
  return {
    getBanners: () => {
      dispatch(getTopBannersAction())
    }
  }
}

export default connect(mapStateToProps,mapDispatchToProps)(memo(HRecommend));
*/
function HRecommend () {
  return (
    <RecommendWrapped>
      <HTopBanner/>
      <Content className={"wrap-v2"}>
        <RecommendLeft>
          <HHotRecommend/>
          <HNewAlbum/>
          <HRanking/>
        </RecommendLeft>
        <RecommendRight>
        
        </RecommendRight>
      </Content>
    </RecommendWrapped>
  )
}

export default memo(HRecommend);
